//
//  HZWeathrView.m
//  MyDoctor
//
//  Created by 黑眼圈 on 16/5/4.
//  Copyright © 2016年 heiyan. All rights reserved.
//

#import "HZWeathrView.h"


@implementation HZWeathrView



- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        //设置并添加子控件
        [self setupUI];
    }
    return self;
}

#pragma mark -
#pragma mark    设置并添加子控件
-(void)setupUI{
    
    //设置背景色
    self.backgroundColor = [UIColor colorWithRed:182/255.0 green:241/255.0 blue:225/255.0 alpha:1];
    
    
//    [self gainData];
}

-(void)gainData{
//    
//    NSString *city = @"上海";
//    NSString *urlString = @"http://api.map.baidu.com/telematics/v3/weather";
//    
//    NSDictionary *paras = @{@"location":city,
//                               @"output":@"json",
//                               @"ak":@"17IvzuqmKrK1cGwNL6VQebF9"
//                               };
//    
//    [[HZNetTools sharedTools] postRequest:urlString parameters:paras finishedBlock:^(id responstObject, NSError *error) {
//        
//        NSLog(@"%@",error);
//        NSLog(@"%@",responstObject);
//    }];
    
//    [[NetWorkTool shareManager] POST_RequestWithUrlString:urlString parmas:paras successBloock:^(id responseObject) {
//        
//        NSLog(@"%@",responseObject);
//    } failureBlock:^(NSError *error) {
//        
//        NSLog(@"天气获取失败");
//    }];
    
}


















@end
